<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>确认订单</title>
<link rel="stylesheet" type="text/css" href="CSS/CSSbuy.css" />


</head>

<body>
<?php
include "head.php";

?>
<div id="tbody" style="width: 1100px; height: auto; margin: 0 auto; border: 0px solid #000">
  <div id="add">
    <div id="addold">
        <?php
		 /*  if(@$_SESSION['userid'] == ''){
				echo "<meta http-equiv=\"refresh\" content=\"0.5;url=user/login.php\">";
			}else{
				@$userid = $_SESSION['userid'];
				$add = $bb->findadd(@$userid);
				if($add != ''){
					$num = count($add);
				for($i=0; $i < $num; $i++){ 
				 */
				for($i = 0; $i<7; $i++){
		?>
        <div class="addoldadd">
            <p class="borbot"><span><?php echo @$add['name']; ?>ccho</span>&nbsp;&nbsp;<span><?php echo @$add['tel']; ?>13816076038</span></p>
            <p><span><?php echo @$add['province']; ?>河北</span>&nbsp;&nbsp;<span><?php echo @$add['city']; ?>保定</span></p>
            <p><span><?php echo @$add['detadd']; ?>up99县yy村7号</span></p>
            <p class="colblue">修改信息</p>
        </div>
		<?php 
				}
		//  	}else{ 使用新地址; } }
		 ?>

    </div>
    <div id="addnew">
        <button>使用新地址</button>
        <div id="addnewadd">
            添加新地址框未写，address数据表未建立，buy.php显示的只是代码中写的 
        </div>
    </div>
  </div>
  

  <div id="buypro">
      <table id="bptable1">
          <tr class="pad5">
             <td></td><td><strong>商品名称</strong></td><td><strong>规格属性</strong></td><td><strong>单价</strong></td><td><strong>数量</strong></td><td><strong>小计</strong></td>
          </tr>
          
 <?php
    $res= $bb->findprocar(@$userid);
				if($res != ''){
				while($probuy = mysqli_fetch_assoc($res) ){
				//for($i=0; $i < $num; $i++){    
?>
          
          <tr>
              <td><input type="checkbox"></td>
              <td style=" width:280px;"><?php echo @$probuy['proname']; ?></td>
              <td style=" width:200px;"><?php echo @$probuy['ex01']; ?><br><?php echo @$probuy['ex02']; ?></td>
              <td style=" width:100px;">99</td><!--商品价格忘记传-->
              <td style=" width:200px;" id="bpsl">
                    
                    <table id="ulbp">
                        <tr><!--数量更改提交后更新数据库-->
                            <td style=" width: 25px;"></td><td><img src="img/ddjian.png" /></td><td><input type="text" id="shuliang" value="<?php echo @$probuy['num']; ?>"></td><td><img src="img/ddjia.png" /></td>
                        </tr>
                    </table>
             
              </td>
              <td style=" width:150px;">99</td><!--钱计算-->
          </tr>
          <?php  } }//} ?>
      </table>
      
      <table id="bptable2">
          <tr>
              <td style=" width:150px;">给卖家留言</td><!--提交时更新卖家留言-->
              <td style=" width:300px;"><form><input type="text" name="mestoshop" style=" width: 100%"></form></td>
              <td style=" width:150px;">运送方式</td>
              <td style=" width:200px;">普通快递</td>
              <td style=" width:150px;" id="yunfei">10</td><!--js判断商品商品总价格大于等于谋值 #运费=0， 否则为10-->
          </tr>
          <tr>
              <td></td><td></td><td></td><td class="tright">合计（含运费）</td><td class="tright">109</td>
          </tr>
      </table>
      <button>提交订单</button><!--点击后更新数据表prosold 数量、买家留言和status，同时跳转到pay.php并传递需要的信息-->
  </div>

</div>
<?php
include "foot.php";
?>
</body>
</html>